A CAM is a particular type of random access memory (RAM) that can be written to and read from like a standard RAM, but can also be quickly searched for specific content. In particular, a CAM can be searched for a set of consecutive memory cells that have a specified string of data values. Typically, the size of the search string corresponds to the data word length of the CAM, and the search is performed in parallel in all stored words (e.g., in a single clock cycle). If the search string is found in the CAM, the CAM outputs the address of the stored word where the search string exists. If the search string exists in two or more stored words, the search will identify only one of them (e.g., the one with the lowest address).
FIG. 1, for example, shows a schematic diagram of the architecture of a CAM 100 containing four stored words W0-W3, each having three bits. Each bit is programmed into memory cells 110 using word lines and bit lines that are not explicitly shown in the figure. Match lines ML0-ML3 run horizontally through the stored words and terminate in match line sense amplifiers 120. Pairs of differential search-data lines MDLT0-MDLT2 and MDLC0- MDLC2 (where “T” designates true and “C” designates complement) run vertically through the memory cells and terminate in a search data register 130. A content search operation begins by loading the search string into the search data register followed by precharging all the match lines high, thereby putting them temporarily into the match state. Next the search data register broadcasts the search string into the differential search-data lines, and each memory cell compares its stored bit against the bits on its corresponding search-data lines. Match lines on which all bits match remain in the precharged-high state. Match lines with at least one bit that do not match discharge to ground. The match line sense amplifiers then detect whether their respective match lines have a match condition or miss condition. Finally, an encoder 140 maps the match line of the matching location to its encoded address.
CAMs can be used in a wide variety of applications requiring high search speeds. CAMs are used extensively, for example, to classify and forward Internet Protocol (IP) packets in network routers. The function of a network router is to compare the destination address of a packet to all possible routes in order to choose the appropriate route. A CAM is a good choice for implementing this lookup operation due to its relatively fast search capability.
However, the speed of a conventional CAM comes at the cost of increased silicon area and power consumption when compared to many other RAM technologies. Both the speed of a CAM and its power consumption are typically a function of a CAM's size. As a CAM becomes smaller, the resistances of those circuit elements constituting the CAM likewise become smaller. Moreover, the distances signals must travel in the CAM and the capacitive loading on the circuit elements of the CAM also tend to decrease. Capacitive coupling (e.g., crosstalk) between nearby circuit elements also typically decreases with CAM size.
As a result, there remains a need for new area-efficient CAM designs with improved performance and power consumption characteristics over conventional designs.